/*-----Select Dialog-----------------*/
function showSelectDialog(parentObjId,rightListBoxId,url,callback) {
	$.ajax({
		type:"post",
		url:url,
		success:function(msg){
			$("#dialog").html(msg);
			$("#dialog").dialog({
				autoOpen: true,
				width: 800,
				title:$(".dialogtitle").attr("title"),
				modal: true,
				buttons: [
					{
						text: "确定",
						click: function() {
							$("#"+rightListBoxId+" tbody tr").removeClass("ui-state-active");
							$("#" + parentObjId +" tbody").html($("#"+rightListBoxId+" tbody").html());
							$("#" + parentObjId +" tbody tr").attr("onclick","");
							setTableCSS(parentObjId);
							if ($.isFunction(callback)) {
								callback();
							}
							$(this).dialog( "close" );
						}
					},
					{
						text: "取消",
						click: function() {
							if ($.isFunction(callback)) {
								callback();
							}
							$(this).dialog( "close" );
						}
					}
				]
			});
			$("#"+rightListBoxId+" tbody").html($("#" + parentObjId +" tbody").html());
			$("#"+rightListBoxId+" tbody tr").attr("onclick","clickSelect(this)");
			setTableCSS(rightListBoxId);
		}
	});
}

/*-----Vehicle List for Dialog-----------------*/
function ajaxFindVehicleSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindVehicleSelectList.do",
		data:{platenum:$("#txtPlateNum").val(),platetype:$("#lstLicencePlateKind").val(),vehiclestate:$("#lstVehicleStates").val()},
		success:function(msg){
			$("#leftVehicleList").replaceWith(msg);
		}
	});
}

/*-----VehicleType for Dialog-----------------*/
function ajaxFindVehicleTypeSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindVehicleTypeSelectList.do",
		data:{name:$("#txtName").val()},
		success:function(msg){
			$("#leftVehicleTypeList").replaceWith(msg);
		}
	});
}

/*-----VehicleClassificationList for Dialog-----------------*/
function ajaxFindVehicleClassificationSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindVehicleClassificationSelectList.do",
		data:{name:$("#txtName").val()},
		success:function(msg){
			$("#leftVehicleClassificationList").replaceWith(msg);
		}
	});
}

/*-----UseNature List for Dialog-----------------*/
function ajaxFindUseNatureSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindUseNatureSelectList.do",
		data:{name:$("#txtName").val()},
		success:function(msg){
			$("#leftUseNatureList").replaceWith(msg);
		}
	});
}

/*-----LicencePlateKind List for Dialog-----------------*/
function ajaxFindLicencePlateKindSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindLicencePlateKindSelectList.do",
		data:{name:$("#txtName").val(),parentcode:"013000"},
		success:function(msg){
			$("#leftLicencePlateKindList").replaceWith(msg);
		}
	});
}

/*-----LaneConfig List for Dialog-----------------*/
function ajaxFindLaneConfigSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindLaneConfigSelectList.do",
		data:{configname:$("#dialogName").val(),canvia:$("#dialogCanVia").val(),vehiclegroupid:$("#dialogVehicleGroups").val()},
		success:function(msg){
			$("#leftLaneConfigList").replaceWith(msg);
		}
	});
}

/*-----VehicleTravelStrategy List for Dialog-----------------*/
function ajaxFindVehicleTravelStrategySelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindVehicleTravelStrategySelectList.do",
		data:{name:$("#dialogName").val(),signalstate:$("#dialogSignalLampStatus").val(),direction:$("#dialogTravelDirection").val()},
		success:function(msg){
			$("#leftVehicleTravelStrategyList").replaceWith(msg);
		}
	});
}
/*-----Device List for Dialog-----------------*/
function ajaxFindDeviceSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindDeviceSelectList.do",
		data:{devicename:$("#deviceName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftDeviceList").replaceWith(msg);
		}
	});
}
/*-----IllegalInformProcess List for Dialog-----------------*/
function ajaxFindIllegalInformProcessSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindIllegalInformProcessSelectList.do",
		data:{devicename:$("#illegalInformProcessName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftIllegalInformProcessList").replaceWith(msg);
		}
	});
}
/*-----IllegalLocation List for Dialog-----------------*/
function ajaxFindIllegalLocationSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindIllegalLocationSelectList.do",
		data:{devicename:$("#illegalLocationName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftIllegalLocationList").replaceWith(msg);
		}
	});
}
/*-----IllegalInformRule List for Dialog-----------------*/
function ajaxFindIllegalInformRuleSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindIllegalInformRuleSelectList.do",
		data:{devicename:$("#IllegalInformRuleName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftIllegalInformRuleList").replaceWith(msg);
		}
	});
}
/*-----IllegalActionType List for Dialog-----------------*/
function ajaxFindIllegalActionTypeSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindIllegalActionTypeSelectList.do",
		data:{devicename:$("#IllegalActionTypeName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftIllegalActionTypeList").replaceWith(msg);
		}
	});
}
/*-----HandlingWay List for Dialog-----------------*/
function ajaxFindHandlingWaySelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindHandlingWaySelectList.do",
		data:{devicename:$("#HandlingWayName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftHandlingWayList").replaceWith(msg);
		}
	});
}
/*-----SuperviseVehicle List for Dialog-----------------*/
function ajaxFindSuperviseVehicleSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindSuperviseVehicleSelectList.do",
		data:{devicename:$("#SuperviseVehicleName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftSuperviseVehicleList").replaceWith(msg);
		}
	});
}
/*-----SuperviseSite List for Dialog-----------------*/
function ajaxFindSuperviseSiteSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindSuperviseSiteSelectList.do",
		data:{devicename:$("#SuperviseSiteName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftSuperviseSiteList").replaceWith(msg);
		}
	});
}
/*-----InformRule List for Dialog-----------------*/
function ajaxFindInformRuleSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindInformRuleSelectList.do",
		data:{devicename:$("#InformRuleName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftInformRuleList").replaceWith(msg);
		}
	});
}
/*-----InformTemplate List for Dialog-----------------*/
function ajaxFindInformTemplateSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindInformTemplateSelectList.do",
		data:{devicename:$("#InformTemplateName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftInformTemplateList").replaceWith(msg);
		}
	});
}
/*-----InformObject List for Dialog-----------------*/
function ajaxFindInformObjectSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindInformObjectSelectList.do",
		data:{devicename:$("#InformObjectName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftInformObjectList").replaceWith(msg);
		}
	});
}
/*-----InformAccount List for Dialog-----------------*/
function ajaxFindInformAccountSelectList() {
	$.ajax({
		type:"post",
		url: "ajaxFindInformAccountSelectList.do",
		data:{devicename:$("#InformAccountName").val(),deviceNum:$("#deviceNum").val()},
		success:function(msg){
			$("#leftInformAccountList").replaceWith(msg);
		}
	});
}
